home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Imagine the Universe (9th Edition)
/
Imagine the Universe 9 - Disc 1.iso
/
pc
/
imagine
/
YBA
/
HTCas-size
/
javascript
/
betelgeuse.js
< prev
next >
Wrap
Text File
|
2003-01-12
|
566b
|
26 lines
size = "Blank";
function checkme() {
size = document.betelgeuse.answer.value - 0;
if (!size) {size = "Blank";}
RightOnFile = './betelgeuse-correct.html';
TryAgainFile = './betelgeuse-close.html';
WayWrongFile = './betelgeuse-wrong.html';
low_wrong = 0.0275;
low_good = 0.0440;
hi_good = 0.0665;
hi_wrong = 0.0801;
if ((size != "Blank") && (size >= low_good) && (size <= hi_good)) {
location = RightOnFile;
}
else if ((size == "Blank") || ((size < low_wrong) || (size > hi_wrong))) {
location = WayWrongFile;
}
else {
location = TryAgainFile;
}
}